import React, { Component } from 'react'
import {Statistic} from 'antd'
import Searchs from '@c/searchHeader'
import Ctable from '@c/table'
import {connect} from "dva"

@connect(s => ({
  ...s['index']
}))
class Page extends Component {
  constructor(){
    super()
    this.searchs=[
      {
        type: 'input',
        alias: 'a',
        name: '企业名称'
      },
    ]
    this.columns=[
      {
        title: '企业名称',
        dataIndex: 'a',
        width: 150
      },
      {
        title: '联系方式',
        dataIndex: 'b',
        width: 100
      },
      {
        title: '门店消费总额',
        dataIndex: 'c',
        width: 60
      },
      {
        title: '线上消费总额',
        dataIndex: 'd',
        width: 120
      },
      {
        title: '员工门店消费总额',
        dataIndex: 'e',
        width: 80
      },
    ]
  }
  componentDidMount() {}
  renderNumbers=() => {
    return(
      <div>
        <Statistic title={'企业消费'} value={1234.55}/>
        <Statistic title={'企业员工消费'} value={1234.55}/>
      </div>
    )
  }
  render() {
    return (
      <div>
        <div>企业会员</div>
        {this.renderNumbers()}
        <Searchs option={this.searchs}/>
        <Ctable
          columns={this.columns}
        />
      </div>
    )
  }
}

export default Page

